<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
$return['member']=$this->pdo_get('member',array('mid'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']));
if($_RQ['op']=='main'){
	$return['member']['pcd']=json_decode($return['member']['pcd'],true);
	$member=pdo_get('core_members',array('id'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']),array('credit1','credit2','mobile','groupid','avatar','nickname'));
	$return['fans']=$member;
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();
	$data=array_fields(array('image','realname','title','mobile','remark','address'),$postdata);
	$data['pcd']=ijson_encode($postdata['pcd']);
	if($return['member']){
		$this->pdo_update('member',$data,array('mid'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']));
	}else{
		$data['mid']=$_SESSION['uid'];
		$data['uniacid']=$_SESSION['uniacid'];
		$data['createtime']=time();
		$this->pdo_insert('member',$data);
	}
	exi('设置成功','','goback');
}
?>